<div id="user_list">
    <!--<div class="control_nav">
        <div class="control_nav_l">
            &nbsp;
        </div>
        <div class="control_nav_r">
            <a href="<?php echo site_url('admin/contact/add');?>"><?php echo image_asset('icons/add.png',''); ?> <?php echo $this->lang->line('add'); ?></a>
        </div>
        <div class="clear"></div>
    </div>-->
    
    <table id="user_list_tb" class="list_tb datatable">
        <thead>
            <tr>
                <th><?php echo $this->lang->line('topic'); ?> (en)</th>
                <th><?php echo $this->lang->line('topic'); ?> (th)</th>
                <th><?php echo $this->lang->line('email'); ?></th>
                <th class="action"></th>
            </tr>
        </thead>
        <tbody>
        <?php
            if(is_array($contact_list)){
                foreach($contact_list as $val){
                    $title = json_decode($val['val']);
                    
                    $video = '';
                    if($title->db=='true'){
                        $video = ' <a href="'.site_url('admin/contact/testimonial/').'" title="view">'.image_asset('icons/application_view_list.png','',array('alt'=>'view')).'</a>';
                    }
                    
                    $edit = '<a href="'.site_url('admin/contact/edit/'.$val['id']).'" title="edit">'.image_asset('icons/pencil.png','',array('alt'=>'edit')).'</a>';
                    
                    echo <<<EOF
                        <tr>
                            <td>{$title->title->english}</td>
                            <td>{$title->title->thai}</td>
                            <td>{$title->email}</td>
                            <td class="center">{$edit}{$video}</td>
                        </tr>
EOF;
                }
            }else{
                echo '<tr><td colspan="7" class="center">' , $this->lang->line('contact empty') , '</td></tr>';
            }
        ?>
        </tbody>
    </table>
    <div class="clear"></div>
</div>